using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MultidimensionTools
{
    /// <summary>
    /// <para>Merge Multidimensional Rasters</para>
    /// <para>Combines multiple multidimensional raster datasets spatially, or across variables and dimensions.</para>
    /// <para>在空间上或跨变量和维度组合多个多维栅格数据集。</para>
    /// </summary>    
    [DisplayName("Merge Multidimensional Rasters")]
    public class MergeMultidimensionalRasters : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MergeMultidimensionalRasters()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_multidimensional_rasters">
        /// <para>Input Multidimensional Rasters</para>
        /// <para>The input multidimensional rasters to be combined.</para>
        /// <para>要合并的输入多维栅格。</para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output Raster</para>
        /// <para>The merged multidimensional raster dataset in Cloud Raster Format (a .crf file).</para>
        /// <para>云栅格格式的合并多维栅格数据集（.crf 文件）。</para>
        /// </param>
        public MergeMultidimensionalRasters(List<object> _in_multidimensional_rasters, object _out_raster)
        {
            this._in_multidimensional_rasters = _in_multidimensional_rasters;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Multidimension Tools";

        public override string ToolName => "Merge Multidimensional Rasters";

        public override string CallName => "md.MergeMultidimensionalRasters";

        public override List<string> AcceptEnvironments => ["cellSize", "compression", "configKeyword", "extent", "geographicTransformations", "nodata", "outputCoordinateSystem", "parallelProcessingFactor", "pyramid", "rasterStatistics", "resamplingMethod", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_multidimensional_rasters, _out_raster, _resolve_overlap_method.GetGPValue()];

        /// <summary>
        /// <para>Input Multidimensional Rasters</para>
        /// <para>The input multidimensional rasters to be combined.</para>
        /// <para>要合并的输入多维栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Multidimensional Rasters")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_multidimensional_rasters { get; set; }


        /// <summary>
        /// <para>Output Raster</para>
        /// <para>The merged multidimensional raster dataset in Cloud Raster Format (a .crf file).</para>
        /// <para>云栅格格式的合并多维栅格数据集（.crf 文件）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Resolve Overlap Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the method to use to resolve overlapping pixels in the combined datasets.</para>
        ///   <bulletList>
        ///     <bullet_item>First—The pixel value in the overlapping areas will be the value from the first raster in the list of input rasters. This is the default.</bullet_item><para/>
        ///     <bullet_item>Last—The pixel value in the overlapping areas will be the value from the last raster in the list of input rasters.</bullet_item><para/>
        ///     <bullet_item>Minimum—The pixel value in the overlapping areas will be the minimum value of the overlapping pixels.</bullet_item><para/>
        ///     <bullet_item>Maximum—The pixel value in the overlapping areas will be the maximum value of the overlapping pixels.</bullet_item><para/>
        ///     <bullet_item>Mean—The pixel value in the overlapping areas will be the average of the overlapping pixels.</bullet_item><para/>
        ///     <bullet_item>Sum—The pixel value in the overlapping areas will be the total sum of the overlapping pixels.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于解析组合数据集中的重叠像素的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>第一 - 重叠区域中的像素值将为输入栅格列表中第一个栅格的值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>最后 - 重叠区域中的像素值将为输入栅格列表中最后一个栅格的值。</bullet_item><para/>
        ///     <bullet_item>最小值 - 重叠区域中的像素值将是重叠像素的最小值。</bullet_item><para/>
        ///     <bullet_item>最大值—重叠区域中的像素值将是重叠像素的最大值。</bullet_item><para/>
        ///     <bullet_item>平均值 - 重叠区域中的像素值将是重叠像素的平均值。</bullet_item><para/>
        ///     <bullet_item>总和—重叠区域中的像素值将是重叠像素的总和。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Resolve Overlap Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _resolve_overlap_method_value _resolve_overlap_method { get; set; } = _resolve_overlap_method_value._FIRST;

        public enum _resolve_overlap_method_value
        {
            /// <summary>
            /// <para>First</para>
            /// <para>First—The pixel value in the overlapping areas will be the value from the first raster in the list of input rasters. This is the default.</para>
            /// <para>第一 - 重叠区域中的像素值将为输入栅格列表中第一个栅格的值。这是默认设置。</para>
            /// </summary>
            [Description("First")]
            [GPEnumValue("FIRST")]
            _FIRST,

            /// <summary>
            /// <para>Last</para>
            /// <para>Last—The pixel value in the overlapping areas will be the value from the last raster in the list of input rasters.</para>
            /// <para>最后 - 重叠区域中的像素值将为输入栅格列表中最后一个栅格的值。</para>
            /// </summary>
            [Description("Last")]
            [GPEnumValue("LAST")]
            _LAST,

            /// <summary>
            /// <para>Minimum</para>
            /// <para>Minimum—The pixel value in the overlapping areas will be the minimum value of the overlapping pixels.</para>
            /// <para>最小值 - 重叠区域中的像素值将是重叠像素的最小值。</para>
            /// </summary>
            [Description("Minimum")]
            [GPEnumValue("MIN")]
            _MIN,

            /// <summary>
            /// <para>Maximum</para>
            /// <para>Maximum—The pixel value in the overlapping areas will be the maximum value of the overlapping pixels.</para>
            /// <para>最大值—重叠区域中的像素值将是重叠像素的最大值。</para>
            /// </summary>
            [Description("Maximum")]
            [GPEnumValue("MAX")]
            _MAX,

            /// <summary>
            /// <para>Mean</para>
            /// <para>Mean—The pixel value in the overlapping areas will be the average of the overlapping pixels.</para>
            /// <para>平均值 - 重叠区域中的像素值将是重叠像素的平均值。</para>
            /// </summary>
            [Description("Mean")]
            [GPEnumValue("MEAN")]
            _MEAN,

            /// <summary>
            /// <para>Sum</para>
            /// <para>Sum—The pixel value in the overlapping areas will be the total sum of the overlapping pixels.</para>
            /// <para>总和—重叠区域中的像素值将是重叠像素的总和。</para>
            /// </summary>
            [Description("Sum")]
            [GPEnumValue("SUM")]
            _SUM,

        }

        public MergeMultidimensionalRasters SetEnv(object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object nodata = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object pyramid = null, object rasterStatistics = null, object resamplingMethod = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, nodata: nodata, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, pyramid: pyramid, rasterStatistics: rasterStatistics, resamplingMethod: resamplingMethod, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}